<!-- 启动页 -->

<template>
	<view class="initiate">
		<view class="logs">
			<view class="fig">
				<image src="/static/logo.png" mode=""></image>
			</view>
			<view class="logstext">
				<text>吃!我们是认真的</text>
			</view>
			
		</view>
		<view class="animation">
			<view class="animationfig">
				<image src="/static/loading.png" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script setup>
import { onMounted, onUnmounted } from 'vue'

let timerId = null

onMounted(() => {
  timerId = setTimeout(() => {
    console.log('定时器执行')
	uni.redirectTo({
		url:"/pages/steer/steer"
	})
    // 自动清除（可选）
    timerId = null
  }, 3000)
})

onUnmounted(() => {
  if (timerId) clearTimeout(timerId)
  console.log('定时器清除')
})
</script>

<style scoped>
.initiate{
	width: 750rpx;
	height: 100vh;
	background-color: #f6ffe1;
	display: flex;
	flex-direction:column;
	justify-content:space-around;
}
.logs{
	width: 100%;
	/* background-color: aqua; */
	
}
.fig{
	width: 150rpx;
	height: 150rpx;
	margin: auto;
	
}
.fig  image{
	width: 150rpx;
	height: 150rpx;	
}
.logstext{
	text-align: center;
}

.animation{
	width: 100%;
	/* background-color: aqua; */
}
.animationfig{
	width: 100rpx;
	height: 100rpx;
	margin: auto;
}
.animationfig image{
	width: 100%;
	height: 100%;
	animation: rotate 1s linear infinite;  /* 核心动画属性 */
	
}
 /* 关键帧动画定义 */
@keyframes rotate {
	from {
            transform: rotate(0deg);
    }
    to {
         transform: rotate(360deg);
    }
}
	
	
	

</style>
